package oop.core.map;



import java.util.List;
import java.io.Serializable;

import oop.core.view.Renderable;

/**
 * A class to hold the image for the terrain and determine if the player can move over it. 
 */
public class Terrain implements Renderable
{
	private String imageID;
	private MovementType typeMovable;
	
	public Terrain(String s, MovementType t){
		imageID = s;
		typeMovable = t;
	}
	
	public String getImageID()
	{
		return imageID;
	}

	public MovementType getTypeMovable()
	{
		return typeMovable;
	}
	
	/**
	 * Takes in a List of movement types and uses them to check if that list
	 * allows them to walk on the current terrain.
	 * @param moveT
	 * @return
	 */
	public boolean isMovableOverMe(List<MovementType> moveT){
		for(MovementType t : moveT){
			if(t == typeMovable){
				return true;
			}
		}
		return false;  
	}
	
	public void setImageID(String s){
		imageID = s;
	}
}
